package com.briup.jz.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.briup.jz.bean.AccountEmployee;
import com.briup.jz.bean.AccountEmployeeExample;
import com.briup.jz.dao.AccountEmployeeMapper;
import com.briup.jz.service.IAccountEmployeeService;
@Service
public class AccountEmployeeImpl implements IAccountEmployeeService{
	@Autowired
	private AccountEmployeeMapper accountemployeemapper;
	public List<AccountEmployee> selectByExample(AccountEmployeeExample example) {
		return accountemployeemapper.selectByExample(example);
		
	}

	@Override
	public String deleteByPrimaryKey(Long id) {
		accountemployeemapper.deleteByPrimaryKey(id);
		return null;
	}

	@Override
	public AccountEmployee selectByPrimaryKey(Long id) {
		return accountemployeemapper.selectByPrimaryKey(id);
	}

	@Override
	public void saveOrUpdate(AccountEmployee accountemployee) {
		// TODO Auto-generated method stub
		if(accountemployee.getId()!=null) {
			accountemployeemapper.updateByPrimaryKey(accountemployee);}
		else {
			accountemployeemapper.insert(accountemployee);
		}
	}

}
